#include <stdio.h>

//https://www.nowcoder.com/practice/f65c726d081c4160a9356eabf0dc21d9?tpId=290&tqId=310694&ru=/exam/oj/ta&qru=/ta/beginner-programmers/question-ranking&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

int main() {
    double n = 0;
    double sum = 0;
    scanf("%lf", &n);
    do {
        if ((int) n % 2 == 0) {
            sum += 1 / -n;
        } else {
            sum += 1 / n;
        }
    } while (--n);
    printf("%.3f", sum);
    return 0;
}